import requests


url = 'http://localhost:5000'

if __name__ == '__main__':
    rsp = requests.post(
        f'{url}/login',
        json={'username': 'tengteng', 'password': '1122'}
    )

    print(rsp.status_code)
    print(rsp.content.decode())

if __name__ == '__main__':
    rsp = requests.get(
        f'{url}/random',
        params={'min': 1,'max': 10}
    )

    print(rsp.status_code)
    print(rsp.content.decode())